package com.tjsinfo.tjsoa.fileExpress.action;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;

import com.tjsinfo.tjsoa.fileExpress.bo.IFileExpressFileBo;

public class CopyFileAction extends Action{
	private IFileExpressFileBo expressFileBo;
	public void setExpressFileBo(IFileExpressFileBo expressFileBo) {
		this.expressFileBo = expressFileBo;
	}
	public ActionForward execute(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response) {
		
		String copyid = request.getParameter("copyid");
		String copygroup = request.getParameter("copygroup");
		expressFileBo.MoveFile(copyid.substring(0, copyid.length()-1), copygroup);
		request.setAttribute("first", "shi");
		
		request.setAttribute("linkurl", "tjsinfo/tjsoa/fileExpress/intoCopyFile.do");
		request.setAttribute("message", "moveok");
		return mapping.findForward("success");
	}
}
